/**
 * 
 */
package cn.biplam.front.template.main;

import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.front.html.HtmlText;
import cn.biplam.front.html.base.HtmlWindow;
import cn.biplam.front.template.Template;
import cn.biplam.front.template.base.Anchor;

/**
 * 消息(超链接)
 * @author 	WangSong
 * @create 	2009-4-10 下午06:56:08
 * @version 1.0
 */
public class MessageAnchor implements Template{
	
	private HtmlWindow msg;

	/**
	 * 构造方法
	 * @param pre	前置说明文字(黑色)
	 * @param num	中间描述数字(红色)
	 * @param tail	尾部说明文字(黑色)
	 * @throws ErrorMessage
	 */
	public MessageAnchor(String url,String pre,String num,String tail) throws ErrorMessage{
		Anchor anchor=new Anchor(url);
		anchor.setDefaultColor("black");
		
		HtmlText preText=new HtmlText(null,"st");
		preText.setMarginTop("1");
		preText.put(pre);
		
		HtmlText numText=new HtmlText(null,"st");
		numText.setMarginTop("1");
		numText.setFontColor("#FF0000");
		numText.put(num);
		
		HtmlText tailText=new HtmlText(null,"st");
		tailText.setMarginTop("1");
		tailText.put(tail);
		
		anchor.put(preText);
		anchor.put(numText);
		anchor.put(tailText);
		this.msg=anchor.get();
	}
	
	public HtmlWindow get(){
		return this.msg;
	}
	

}
